<template>
  <uni-tooltip class="van-popover" :content="modelValue" :placement="placement">
    <view slot="default">
      <slot name="reference"></slot>
    </view>
    <view class="van-popover__content" slot="content">
      <slot name="default"></slot>
    </view>
  </uni-tooltip>
</template>

<script>
import {parse, stringify} from '@/assets/js/util'

export default {
  data() {
    return {}
  },
  watch: {
    rate(val) {
      this.$emit('update:modelValue', val)
    }
  },
  props: {
    modelValue: {
      type: String,
      default: false
    },
    placement: {
      type: String,
      default: 'left'
    }
  },
  emits: ['update:modelValue'],
  methods: {}
}
</script>

<style lang="scss" scoped>
.van-popover {
  :deep(.uni-tooltip-popup) {
    padding: 4px;
    min-width: 120px;
  }

  .van-popover__content {
    //width: 20vw;
  }
}
</style>